package machine.utils;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghui145
 * @date 2021/12/26 16:32
 * @since 1.0.0
 */
@Component
public final class GroupUtils {

    private static final List<Integer> GROUP_NUM = new ArrayList<>();

    @PostConstruct
    public void init(){
        // 这里设置为群号
        GROUP_NUM.add(111111111);
        GROUP_NUM.add(222222222);
    }

    public static Integer friendGroup(){
        return GROUP_NUM.get(0);
    }

    public static Integer myGroup(){
        return GROUP_NUM.get(1);
    }

    public static boolean contain(Integer id){
        if (id == null) {
            return false;
        }
        return GROUP_NUM.contains(id);
    }
}
